//
//	ZcoModelClientInfo.m
//	Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport



#import "ZcoModelClientInfo.h"

NSString *const kZcoModelClientInfoType = @"type";
NSString *const kZcoModelClientInfoVersion = @"version";

@interface ZcoModelClientInfo ()
@end
@implementation ZcoModelClientInfo




/**
 * Instantiate the instance using the passed dictionary values to set the properties values
 */

-(instancetype)initWithDictionary:(NSDictionary *)dictionary
{
	self = [super init];
	if(![dictionary[kZcoModelClientInfoType] isKindOfClass:[NSNull class]]){
		self.type = dictionary[kZcoModelClientInfoType];
	}	
	if(![dictionary[kZcoModelClientInfoVersion] isKindOfClass:[NSNull class]]){
		self.version = dictionary[kZcoModelClientInfoVersion];
	}	
	return self;
}


/**
 * Returns all the available property values in the form of NSDictionary object where the key is the approperiate json key and the value is the value of the corresponding property
 */
-(NSDictionary *)toDictionary
{
	NSMutableDictionary * dictionary = [NSMutableDictionary dictionary];
	if(self.type != nil){
		dictionary[kZcoModelClientInfoType] = self.type;
	}
	if(self.version != nil){
		dictionary[kZcoModelClientInfoVersion] = self.version;
	}
	return dictionary;

}

/**
 * Implementation of NSCoding encoding method
 */
/**
 * Returns all the available property values in the form of NSDictionary object where the key is the approperiate json key and the value is the value of the corresponding property
 */
- (void)encodeWithCoder:(NSCoder *)aCoder
{
	if(self.type != nil){
		[aCoder encodeObject:self.type forKey:kZcoModelClientInfoType];
	}
	if(self.version != nil){
		[aCoder encodeObject:self.version forKey:kZcoModelClientInfoVersion];
	}

}

/**
 * Implementation of NSCoding initWithCoder: method
 */
- (instancetype)initWithCoder:(NSCoder *)aDecoder
{
	self = [super init];
	self.type = [aDecoder decodeObjectForKey:kZcoModelClientInfoType];
	self.version = [aDecoder decodeObjectForKey:kZcoModelClientInfoVersion];
	return self;

}

/**
 * Implementation of NSCopying copyWithZone: method
 */
- (instancetype)copyWithZone:(NSZone *)zone
{
	ZcoModelClientInfo *copy = [ZcoModelClientInfo new];

	copy.type = [self.type copy];
	copy.version = [self.version copy];

	return copy;
}
@end